sudo adduser www-"$site"-tls www-"$site"
-sudo adduser php5_"$site" www-"$site"
-sudo adduser php5_"$site" postgres-data
-sudo adduser php5_"$site" log-php5-"$site"
+sudo adduser php_"$site" www-"$site"
+sudo adduser php_"$site" postgres-data
+sudo adduser php_"$site" log-php-"$site"
hint="run before: remote/runit-configure nginx -- $site"
assert "sudo test -f /etc/$site/config.php" hint
-sudo chgrp php5_$site /etc/"$site"/config.php
+sudo chgrp php_$site /etc/"$site"/config.php
sudo sv start postgres
while ! sudo -u postgres psql </dev/null
)"
then
sudo cat "$home"/sql/pgsql.schema.sql |
- sudo -u php5_"$site" psql -f - -U "$site" --set ON_ERROR_STOP=1 "$site"
+ sudo -u php_"$site" psql -f - -U "$site" --set ON_ERROR_STOP=1 "$site"
fi
-sudo install -d -m 750 -o root -g php5_"$site" \
+sudo install -d -m 750 -o root -g php_"$site" \
/etc/"$site"
sudo find "$tool"/etc/"$site" -type f \
-not -name config.php \
- -exec install -m 640 -o root -g php5_"$site" \
+ -exec install -m 640 -o root -g php_"$site" \
-t /etc/"$site"/ {} +
pool=cyclo_www
-sudo adduser php5_"$pool" www-"$site"
+sudo adduser php_"$pool" www-"$site"
sudo adduser www-"$site"-tls www-"$site"
-"$tool"/local/mysql-user-create php5_"$pool"
-"$tool"/local/mysql-database-create php5_"$pool"
+"$tool"/local/mysql-user-create php_"$pool"
+"$tool"/local/mysql-database-create php_"$pool"
pool=cyclocamp_www
-sudo adduser php5_"$pool" www-"$site"
+sudo adduser php_"$pool" www-"$site"
sudo adduser www-"$site"-tls www-"$site"
-"$tool"/local/mysql-user-create php5_"$pool"
-"$tool"/local/mysql-database-create php5_"$pool"
+"$tool"/local/mysql-user-create php_"$pool"
+"$tool"/local/mysql-database-create php_"$pool"
pool=davical
-sudo adduser php5_"$pool" www-"$site"
+sudo adduser php_"$pool" www-"$site"
sudo adduser www-"$site"-tls www-"$site"
-sudo adduser php5_"$pool" postgres-data
+sudo adduser php_"$pool" postgres-data
sudo install -m 640 -o root -g postgres /dev/stdin \
/etc/davical/administration.yml <<-EOF
sudo -u postgres psql -qX ${DBA} -c "UPDATE usr SET password = '**${ADMINPW}' WHERE user_no = 1;" "${DBNAME}"
eval home="~www-$pool"
-sudo install -m 640 -o root -g php5_"$pool" \
+sudo install -m 640 -o root -g php_"$pool" \
"$tool"/etc/davical/davical."$local_domainname"-conf.php \
/etc/davical/davical."$local_domainname"-conf.php
pool=lhc_quest
-sudo adduser php5_"$pool" www-"$site"
+sudo adduser php_"$pool" www-"$site"
sudo adduser www-"$site"-tls www-"$site"
-"$tool"/local/mysql-user-create php5_"$pool"
-"$tool"/local/mysql-database-create php5_"$pool"
+"$tool"/local/mysql-user-create php_"$pool"
+"$tool"/local/mysql-database-create php_"$pool"
fastcgi_no_cache $no_cache;
fastcgi_param REDIRECT_STATUS 200;
- fastcgi_pass php5_fpm_lhc_stats;
+ fastcgi_pass php_fpm_lhc_stats;
}
# vim: ft=sh
-upstream php5_fpm_lhc_stats {
+upstream php_fpm_lhc_stats {
server unix:/run/php5/fpm/lhc_stats;
}
pool=lhc_stats
-sudo adduser php5_"$pool" www-"$site"
+sudo adduser php_"$pool" www-"$site"
sudo adduser www-"$site"-tls www-"$site"
-"$tool"/local/mysql-user-create php5_"$pool"
-"$tool"/local/mysql-database-create php5_"$pool"
+"$tool"/local/mysql-user-create php_"$pool"
+"$tool"/local/mysql-database-create php_"$pool"
fastcgi_no_cache $no_cache;
fastcgi_param REDIRECT_STATUS 200;
- fastcgi_pass php5_fpm_lhc_stats;
+ fastcgi_pass php_fpm_lhc_stats;
}
location ~* ^.+\.php$ {
## Any other attempt to access PHP files redirects to the root.
pool=lhc_www
-sudo adduser php5_"$pool" www-"$site"
+sudo adduser php_"$pool" www-"$site"
sudo adduser www-"$site"-tls www-"$site"
pool=ptitvelo_www
-sudo adduser php5_"$pool" www-"$site"
+sudo adduser php_"$pool" www-"$site"
sudo adduser www-"$site"-tls www-"$site"
-"$tool"/local/mysql-user-create php5_"$pool"
-"$tool"/local/mysql-database-create php5_"$pool"
+"$tool"/local/mysql-user-create php_"$pool"
+"$tool"/local/mysql-database-create php_"$pool"
"$tool"/var/pub/x509/"$site"."$local_domainname"/crt+ca.pem \
/etc/nginx/x509.d/"$site"/crt.pem
-sudo adduser php5_"$site" www-"$site"
-sudo adduser php5_"$site" postgres-data
-sudo adduser php5_"$site" log-php5-"$site"
+sudo adduser php_"$site" www-"$site"
+sudo adduser php_"$site" postgres-data
+sudo adduser php_"$site" log-php-"$site"
"$tool"/local/runit-sv-configure postgres
"$tool"/local/runit-sv-start postgres
# for internal use.
roundcube-core roundcube/internal/skip-preseed boolean false
# PostgreSQL username for roundcube:
- roundcube-core roundcube/db/app-user string php5_$site
+ roundcube-core roundcube/db/app-user string php_$site
# Reinstall database for roundcube?
roundcube-core roundcube/dbconfig-reinstall boolean false
# Connection method for MySQL database of roundcube:
roundcube \
roundcube-pgsql \
roundcube-plugins
-sudo chgrp php5_$site /var/log/roundcube/
+sudo chgrp php_$site /var/log/roundcube/
-sudo install -d -m 750 -o root -g php5_"$site" \
+sudo install -d -m 750 -o root -g php_"$site" \
/etc/"$site"
sudo find "$tool"/etc/"$site" -type f \
- -exec install -m 640 -o root -g php5_"$site" \
+ -exec install -m 640 -o root -g php_"$site" \
-t /etc/"$site"/ {} +
-sudo install -m 500 -o php5_"$site" -g root \
+sudo install -m 500 -o php_"$site" -g root \
"$tool"/local/roundcube-chpasswd \
/usr/local/bin/roundcube-chpasswd
EOF
"$tool"/remote/ssh root@"$local_fqdn" ' \
set -efux
- sudo install -d -m 750 -o root -g php5_'"$site"' \
+ sudo install -d -m 750 -o root -g php_'"$site"' \
/etc/'"$site"'
- sudo install -m 640 -o root -g php5_'"$site"' /dev/stdin \
+ sudo install -m 640 -o root -g php_'"$site"' /dev/stdin \
/etc/'"$site"'/key.inc.php
'
admin postgres postgres
admin root postgres
role postgres davical_dba
-role php5_davical davical_app
+role php_davical davical_app
role openerp_cyclofficines openerp_cyclo_ivry
role openerp_cyclofficines openerp_cyclo_paris_est
user postgres agendav
user root roundcube
-user /^php5_(.*)$ \1
+user /^php_(.*)$ \1
user /^(.*)$ \1
-name "php-fpm.conf" \
-printf '%P\n')
do pool=${pool%\/php-fpm\.conf}
- "$tool"/local/adduser php5_"$pool" \
+ "$tool"/local/adduser php_"$pool" \
--disabled-login \
--disabled-password \
--group \
--system
sudo install -d -m 770 -o php5 -g php5 \
/etc/php5/fpm/pool.d/"$pool"
- "$tool"/local/adduser log-php5-"$pool" \
+ "$tool"/local/adduser log-php-"$pool" \
--disabled-login \
--disabled-password \
--group \
sudo install -d -m 1771 -o log-php5 -g log-php5 \
/home/www/log/php5 \
/home/www/log/php5/fpm
- sudo install -d -m 2770 -o log-php5-"$pool" -g log-php5-"$pool" \
+ sudo install -d -m 2770 -o log-php-"$pool" -g log-php-"$pool" \
/home/www/log/php5/fpm/"$pool"
sudo install -m 660 -o php5 -g php5 /dev/stdin \
/etc/php5/fpm/pool.d/"$pool"/php-fpm.conf <<-EOF
env[TEMP] = /tmp
env[TMPDIR] = /tmp
env[TMP] = /tmp
- group = php5_$pool
+ group = php_$pool
#listen = 127.0.0.1:9000
listen = /run/php5/fpm/$pool
#listen.allowed_clients = 127.0.0.1
rlimit_core = unlimited
rlimit_files = 131072
slowlog = /home/www/log/php5/fpm/$pool/slow.log
- user = php5_$pool
+ user = php_$pool
$(cat "$tool"/etc/php5/fpm/pool.d/"$pool"/php-fpm.conf)
EOF
done
sudo chmod -t ~mail/acl/dovecot."$domain"
# NOTE: permet les mv shared.db{.lock,} effectués par dovecot
- sudo install -d -o mail -g php5_roundcube -m 1770 \
+ sudo install -d -o mail -g php_roundcube -m 1770 \
/etc/dovecot/dovecot."$domain"
sudo install -d -o mail -g postfix -m 750 \
/etc/mail/dovecot
!!
EOF
sort -k 1,1 -t : |
- sudo install -o php5_roundcube -g php5_roundcube -m 0640 /dev/stdin "$new_passwd"
+ sudo install -o php_roundcube -g php_roundcube -m 0640 /dev/stdin "$new_passwd"
sudo mv -f "$new_passwd" "$old_passwd"
done 4<<-EOF 3>&1 >&2 |
$(sudo cat "$old_passwd")
EOF
- sudo install -o php5_roundcube -g php5_roundcube -m 0640 /dev/stdin "$new_passwd"
+ sudo install -o php_roundcube -g php_roundcube -m 0640 /dev/stdin "$new_passwd"
sudo mv -f "$new_passwd" "$old_passwd"
fi
# setup_nss
# setup_roundcube
if test "${purge:+set}"
then
- sudo -u php5_roundcube psql -1AqtX --set ON_ERROR_STOP=1 -U roundcube roundcube <<-EOF
+ sudo -u php_roundcube psql -1AqtX --set ON_ERROR_STOP=1 -U roundcube roundcube <<-EOF
DO LANGUAGE plpgsql \$\$
DECLARE uid integer;
BEGIN
#!/bin/sh -efu
-test "$(id -n -u)" = php5_roundcube
+test "$(id -n -u)" = php_roundcube
IFS=: read -r user password
IFS=@ read -r user domain <<-EOF